import { createApp } from 'vue'
import App from './App.vue'
import router from './router'

import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import axios from "axios";
import qs from 'qs'

let myAxios = axios.create({
    baseURL: 'http://127.0.0.1:9999'
})

let app = createApp(App)

app.config.globalProperties.$axios = myAxios
app.config.globalProperties.$qs = qs;
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

app.use(router)
    .use(ElementPlus, {locale: zhCn})
    .mount('#app');

